<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // 伪数组转真数组
        //    1搞一个新的数组， 循环 push

        //    2 es6  Array.from()   把伪数组转真数组



        function fn() {
            console.log(arguments);
            // var arr = [] ;
            // for(var i = 0 ; i < arguments.length ; i++) {
            //     arr.push(arguments[i])
            // }

            var arr = Array.from(arguments);
            console.log(arr);
        }

        fn(1, 2, 3, 4);





    </script>

</body>

</html>